import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';

const get = <T>(url: string, config?: AxiosRequestConfig): Promise<AxiosResponse<T>> => {
  return axios.get<T, AxiosResponse<T>>(url, config);
};

const post = <T>(url: string, config?: AxiosRequestConfig): Promise<AxiosResponse<T>> => {
  return axios.post<T, AxiosResponse<T>>(url, config);
};

export default {
  get,
  post,
};
